Rails.application.routes.draw do
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  mount RuCaptcha::Engine => "/rucaptcha"
    delete "/hotel/info_del" => "hotel#info_del"
    post "/hotel/update_new" => "hotel#update_new"
    post "/hotel/update_info_new" => "hotel#update_info_new"    
    post "/hotel/update_edit" => "hotel#update_edit"   
    post "/hotel/update_info_edit" => "hotel#update_info_edit"        
    get '/hotel/hotel_ajax' => 'hotel#hotel_ajax'
    get '/alarm_record/alarm_ajax' => 'alarm_record#alarm_ajax'
    get '/hotel/hotel_edit_ajax' => 'hotel#hotel_edit_ajax'
    get '/hotel/hotel_ajax_edit_load' => 'hotel#hotel_ajax_edit_load'
    get '/hotel/hotel_ajax_edit_info_load' => 'hotel#hotel_ajax_edit_info_load'  
    root "page#login"  ,:as => "login"
    get '/page/ajax_load' => 'page#ajax_load'
    get '/section/sec_save' => 'section#sec_save'
    post '/section_create' => 'section#create'

    
    post '/new_node' => 'section#new_node'
    
    mount API => '/'    
    # resources :section   
    # resources :box_record
    patch "/user_sys/user_sys_add" => "user_sys#user_sys_add"
    post "/user_sys/user_sys_add" => "user_sys#user_sys_add"

    # patch "/box_record/box_record_add" => "box_record#box_record_add"
    # post "/box_record/box_record_add" => "box_record#box_record_add"

    post "/create_login_session" => "page#create_login_session"
    get '/main' => 'page#main'  ,:as=>"main"
    get '/welcome' => 'page#welcome',:as => "welcome"
    get "/logout" => "page#logout", :as => "logout"
    # get "/report_one" => "report#index", :as => "bb"
    resources :page
    resources :hotel
    resources :record_data
    resources :alarm_record
    resources :section
    resources :user_sys
end
